/*
* Nettle Source File.
* Copyright (C) 2013, Nettle (http://nttl.ru/).
*
* This file is part of NettleMath.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the GNU Lesser General Public License
* (LGPL) version 2.1 which accompanies this distribution, and is available at
* http://www.gnu.org/licenses/lgpl-2.1.html
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* Description:
*
* History:
* Created by Sergey Serb, l-proger@yandex.ru
*/

#ifndef NMathDebug_h__
#define NMathDebug_h__

#include <string>
#include <sstream>

#include "NVector2.h"
#include "NVector3.h"
#include "NVector4.h"
#include "NVectorBase.h"

namespace NettleMath{
    static const char* axis_name[] = {
        "X", "Y", "Z", "W"
    };

    template<typename T>
    inline std::string NVectorToString(const T& v){
        std::stringstream ss;
        for(size_t i = 0; i < v.size; i++){
            ss << axis_name[i] << "=" << v[i] << "; ";
        }
        return ss.str();
    }

    template<>
    inline std::string NVectorToString<NVector3<bool>>(const NVector3<bool>& v){
        std::stringstream ss;
        for(size_t i = 0; i < v.size; i++){
            ss << axis_name[i] << "=" << (v[i] ? "true" : "false") << "; ";
        }
        return ss.str();
    }
}
#endif // NMathDebug_h__
